module.exports = {
	apps: [
		{
			name: 'nestjs-app',
			cwd: __dirname,
			script: 'dist/main.js',
			instances: 1,
			exec_mode: 'fork',
			autorestart: true,
			time: true,
			watch: false,
			max_memory_restart: '512M',
			env: {
				NODE_ENV: 'production',
				PORT: process.env.PORT || 8206,
				DB_HOST: process.env.DB_HOST,
				DB_PORT: process.env.DB_PORT,
				DB_USER: process.env.DB_USER,
				DB_PASS: process.env.DB_PASS,
				DB_NAME: process.env.DB_NAME,
			},
			env_production: {
				NODE_ENV: 'production',
			},
			error_file: 'logs/error.log',
			out_file: 'logs/out.log',
			merge_logs: true,
			log_date_format: 'YYYY-MM-DD HH:mm:ss',
		},
	],
};

